package cn.edu.lingnan.before.controller;

import cn.edu.lingnan.before.serivce.GoodsTableService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;

//页面跳转
@Controller
public class PageController {
    @Resource
    private GoodsTableService goodsTableService;
    // 跳转到登录页面
    @GetMapping("/login")
    public String toLoginPage(){
        return "before/login";
    }
    // 跳转到注册页面
    @GetMapping("/reg")
    public String toRegPage(){
        return "before/register";
    }
    // 跳转首页
    @GetMapping("/toIndex")
    public String toIndex(Model model){
        return goodsTableService.showIndexData(model);
    }
}
